import React from "react";
import LogOut from "../Components/LogOut";
import Back from "../Components/Back";
import Options from "./Options";
import { Button } from "antd";
import "../../../../../node_modules/antd/dist/antd.css";
import "./HomePage.scss";


export default function HomePage() {

  return (
    <div id="homePage">
      {/* 退出按钮 */}
      <Back />
      <div style={{ textAlign: "right", margin: "10px " }}>
        {localStorage.getItem("token") ? (
          ""
        ) : (
          <Button
            style={{
              // margin: "8px ",
              // position: "fixed",
              // zIndex: 101,
              color: "white",
              backgroundColor: "#d43c33",
              borderColor: "#d43c33",
              width: "100px",
            }}
            type="primary"
            shape="round"
            size="middle "
            href="/login"
          >
            登录/注册
          </Button>
        )}
      </div>
      <Options/>
      {localStorage.getItem("token") ? <LogOut /> : ""}
    </div>
  );
}
